package dragon.tagext.model;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;

import dragon.core.exception.ExceptionHandler;
import dragon.model.fieldTemplate.FieldTemplateDao;

@SuppressWarnings("serial")
public class FieldTemplateData extends BodyTagSupport {

	private String bizCode;// 业务模型编码

	private String bizfield;// 业务字段

	private String queryString;// 参数

	@Override
	public int doStartTag() throws JspException {
		try {
			pageContext.setAttribute("data", FieldTemplateDao.getData(bizCode, bizfield, null, queryString));
		} catch (ExceptionHandler e) {
			throw new JspException(e);
		}
		return EVAL_BODY_INCLUDE;
	}

	public void setBizCode(String bizCode) {
		this.bizCode = bizCode;
	}

	public void setBizfield(String bizfield) {
		this.bizfield = bizfield;
	}

	public void setQueryString(String queryString) {
		this.queryString = queryString;
	}

}
